home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / sasspc.tar / sass / patterns.s < prev    next >
Text File  |  1990-10-10  |  904b  |  58 lines

  1. ; Produce patterns on the HP48SX display.
  2.  
  3.  swap.a c,d0        ; Save d0, d1
  4.  push.a    c
  5.  swap.a c,d1
  6.  push.a c
  7.  
  8.  
  9. ; Now we can manipulate the screen
  10.  move.p5    0x7097c,a
  11.  move.p5    2176,c
  12.  add.a        a,c
  13.  move.a        c,r1        ; r1 is stopping address
  14.  move.p2    0xff, a
  15.  move.w        a,r2        ; r2 is value to store
  16.  move.p5    256,a
  17.  move.a        a,r3        ; r3 is global count
  18.  
  19. outer:                ; Outer loop
  20.  move.p5    0x7097c,a
  21.  move.a        a,r0        ; r0 is current address
  22.  
  23. lupe:
  24.  move.a        r0,a        ; Store value
  25.  move.a        a,d0
  26.  move.a        r2,a
  27.  move.2        a,@d0
  28.  
  29. ; Increment address
  30.  move.a        r0,a
  31.  move.a        r1,c
  32.  inc.a        a
  33.  inc.a        a
  34.  move.a        a,r0
  35.  
  36. ; Loop
  37.  brgt.a        c,a,lupe
  38.  
  39. ; Change pattern
  40.  move.b        r2,a
  41.  dec.b        a
  42.  move.b        a,r2
  43.  
  44. ; Outer loop
  45.  move.a        r3,a
  46.  dec.a        a
  47.  move.a        a,r3
  48.  brnz.a        a,outer
  49.  
  50. ; return to the next RPL Instruction
  51.  pop.a    c
  52.  swap.a    c,d1
  53.  pop.a    c
  54.  swap.a    c,d0
  55.  move.a @d0,a
  56.  add.a    5,d0
  57.  jump    @a
  58.